Skip to content

test: remove gas tests and standardize fuzz test naming#133

Merged
adamgall merged 1 commit into
Perfect-Abstractions:mainfrom
adamgall:test-cleanup
Oct 27, 2025
Merged

test: remove gas tests and standardize fuzz test naming#133
adamgall merged 1 commit into
Perfect-Abstractions:mainfrom
adamgall:test-cleanup

Conversation

@adamgall

@adamgall adamgall commented Oct 26, 2025

Copy link
Copy Markdown
Collaborator

Remove all explicit gas tests from the codebase as they are an anti-pattern
that creates maintenance burden without providing real value. Gas costs vary
between compiler versions, optimization settings, and coverage runs, making
exact assertions fragile and requiring constant updates.

Changes:

  • Remove 14 gas tests across Owner and OwnerTwoSteps test files
  • Standardize fuzz test naming from test_Fuzz_* to testFuzz_* convention
  • Clean up test files by removing gas measurement code (gasleft, gasUsed, etc.)

Gas tests removed from:

  • test/access/Owner/LibOwner.t.sol (3 tests)
  • test/access/Owner/OwnerFacet.t.sol (2 tests)
  • test/access/OwnerTwoSteps/LibOwnerTwoSteps.t.sol (4 tests)
  • test/access/OwnerTwoSteps/OwnerTwoSteps.t.sol (5 tests)

Fuzz test naming fixed in:

  • test/token/ERC20/ERC20/ERC20Facet.t.sol
  • test/token/ERC20/ERC20/LibERC20.t.sol

@mudgen

mudgen commented Oct 26, 2025

Copy link
Copy Markdown
Contributor

@adamgall Great to improve this stuff.

Got some failing gas tests in this one.

Also, sent you a message on discord.

@adamgall

Copy link
Copy Markdown
Collaborator Author

will fix these broken actions

@github-actions

github-actions Bot commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

Coverage Report

Coverage

Metric Coverage Details
Lines 33% 306/936 lines
Functions 47% 71/152 functions
Branches 19% 33/171 branches

Last updated: Mon, 27 Oct 2025 03:41:01 GMT for commit 688d284

@adamgall adamgall changed the title chore: standardize test naming conventions and improve gas assertions test: remove gas tests and standardize fuzz test naming Oct 27, 2025
Remove all explicit gas tests from the codebase as they are an anti-pattern
that creates maintenance burden without providing real value. Gas costs vary
between compiler versions, optimization settings, and coverage runs, making
exact assertions fragile and requiring constant updates.

Changes:
- Remove 14 gas tests across Owner and OwnerTwoSteps test files
- Standardize fuzz test naming from `test_Fuzz_*` to `testFuzz_*` convention
- Clean up test files by removing gas measurement code (gasleft, gasUsed, etc.)

Gas tests removed from:
- test/access/Owner/LibOwner.t.sol (3 tests)
- test/access/Owner/OwnerFacet.t.sol (2 tests)
- test/access/OwnerTwoSteps/LibOwnerTwoSteps.t.sol (4 tests)
- test/access/OwnerTwoSteps/OwnerTwoSteps.t.sol (5 tests)

Fuzz test naming fixed in:
- test/token/ERC20/ERC20/ERC20Facet.t.sol
- test/token/ERC20/ERC20/LibERC20.t.sol
@adamgall adamgall merged commit 38d73f4 into Perfect-Abstractions:main Oct 27, 2025
3 checks passed
@adamgall adamgall deleted the test-cleanup branch October 27, 2025 03:51
JackieXu pushed a commit to JackieXu/Compose that referenced this pull request Nov 6, 2025
test: remove gas tests and standardize fuzz test naming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants